// myplugin.js
;(function () {
    class MyPlugin {
      install() {}
      configure(pluginManager) {
        pluginManager.jexl.addFunction('colorFeature', feature => {
          let type = feature.get('type')
          if (type === 'CDS') {
            return 'red'
          } else if (type === 'exon') {
            return 'green'
          } else {
            return 'purple'
          }
        })
      }
    }
  
    // the plugin will be included in both the main thread and web worker, so
    // install plugin to either window or self (webworker global scope)
    ;(typeof self !== 'undefined' ? self : window).JBrowsePluginMyPlugin = {
      default: Plugin,
    }
  })()